/* Copyright 2001,2002,2003 NAH6
 * All Rights Reserved
 *
 * Parts Copyright DoD, Parts Copyright Starium
 *
 */
#include "main.h"
#include "hamming.h"
#include "error.h"

#define ENCODE 0
#define DECODE 1

/**************************************************************************
*                                                                         *
* ROUTINE
*               ErrorEncode
*
* FUNCTION
*               CELP error encoding
* SYNOPSIS
*               ErrorEncode(bit_channel, num_bits, error_parms, edac,
*                               frame_num, channel)
*
*
*
*                       data    I/O
*       name            type    type    function
*       -------------------------------------------------------------------
*       bit_channel     int      i      Frame of CELP bits
*       num_bits        int      i      Number of bits (future)
*       error_parms     char     i      Name of error parameter file (future)
*       edac            int      i      EDAC flag
*       frame_num       int      i      Frame Number (future)
*
**************************************************************************/
void ErrorEncode(
int     bit_channel[],
/*int   num_bits,
char    error_parms[],*/
int     edac/*,
int     frame_num*/)
{

/*  Hamming encode the permuted bitstream if no other edac */
        if(!edac)
          Hamming(bit_channel, ENCODE);

}

/*
*************************************************************************
*                                                                         *
* ROUTINE
*               ErrorDecode
*
* FUNCTION
*               CELP error decoding
* SYNOPSIS
*               ErrorDecode(channel, num_bits, error_parms, BitChannel)
*
*
*
*                       data    I/O
*       name            type    type    function
*       -------------------------------------------------------------------
*       channel         int      i      Frame of channel data
*       num_bits        int      i      Number of bits (future)
*       error_parms     char     i      Name of error parameter file (future)
*       BitChannel      int      o      CELP output parameter bits
*       Assurance       int      o      Assurance value for errors
*
**************************************************************************/

void ErrorDecode(
int             channel[],
/*int           num_bits,
char            error_parms[],*/
int             edac,
int             *Assurance)
{

/*  Hamming decode the permuted bitstream */
        if(!edac)
          *Assurance = Hamming(channel, DECODE);


}

